home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-1.iso
/
program
/
cpc2.zip
/
CP1.DOC
< prev
next >
Wrap
Text File
|
1996-01-13
|
35KB
|
1,123 lines
Geist Microsystems CodePrint for C/C++
C o d e P r i n t f o r C / C + +
V e r s i o n 2 . x x
U s e r M a n u a l
Copyright (c) 1991-1996 by Geist Microsystems.
All rights reserved.
CodePrint is a trademark of Geist Microsystems. Other brand and
product names are trademarks or registered trademarks of their
respective holders.
Geist Microsystems, makes no warranties with respect to this
documentation and disclaims any implied warranties of
merchantability or fitness for a particular purpose.
Information in this document is subject to change without notice.
Geist Microsystems assumes no repsonsibility for errors that may
appear in this document. From time to time, changes may occur
in filenames and files included on the distribution disks.
Geist Microsystems makes no warranties that such files or
facilities as mentioned in this documentation exist on the
distribution disks or as part of the materials distributed.
This manual applies only to CodePrint for C/C++ version
2.00 or later.
CODEPRINT IS A SHAREWARE PRODUCT. YOU MAY USE THE PROGRAM ON A
TRIAL BASIS FOR 30 DAYS AND YOU MAY COPY THE PROGRAM FOR OTHERS
TO TRY. IF YOU FIND THE PROGRAM USEFUL AND YOU CONTINUE TO USE
THE SOFTWARE, YOU NEED TO REGISTER YOUR COPY. REGISTERED USERS
RECEIVE A PRINTED MANUAL, DISK, ONE FREE UPGRADE, ONE YEAR OF
PRODUCT SUPPORT VIA COMPUSERVE E-MAIL, PHONE SUPPORT, AND
NOTIFICATION OF FUTURE PRODUCTS/UPGRADES.
Please direct your registration and product support inquiries
to:
Geist Microsystems
7518 Geist Estates Drive
Indianapolis, IN 46236
Phone (317) 823-1384
CompuServe 70404,3246
Geist Microsystems is a member of the Association of Shareware
Professionals (ASP).
User Manual i
Geist Microsystems CodePrint for C/C++
TABLE OF CONTENTS
Chapter 1
1.0 Introduction ............................................ 1
1.1 System Requirements ..................................... 3
1.2 Disk Contents ........................................... 3
1.3 How CodePrint Works ..................................... 4
Chapter 2
2.0 Installing CodePrint .................................... 5
2.1 Hewlett Packard LaserJet Printer Emulation .............. 6
2.2 Hewlett Packard LaserJet Printer Options ................ 6
2.3 Page Breaks for Multiple Functions ...................... 7
Chapter 3
3.0 Using CodePrint ......................................... 9
3.1 CodePrint Command Syntax ................................ 9
3.2 CodePrint File Specification ............................ 9
3.3 Setting the CodePrint Environment ...................... 10
3.4 CodePrint Options ...................................... 11
3.5 CodePrint Options Arranged by Category ................. 18
Chapter 4
4.0 CodePrint Features ..................................... 19
4.1 Reformatter ............................................ 19
4.1 Pretty Printer ......................................... 19
4.2 On-Line Help ........................................... 19
4.3 Batch Processing and Print Spooling .................... 20
4.4 Keyword Templates ...................................... 21
4.5 Error Messages ......................................... 22
Index ....................................................... 26
User Manual ii
Geist Microsystems CodePrint for C/C++
C o d e P r i n t f o r C / C + +
C h a p t e r 1
I n t r o d u c t i o n
1.0 INTRODUCTION
CodePrint for C/C++ is a command-line driven source code
reformatter and pretty printer for the C programming language
with additional support for the C++ extensions. As a source
code reformatter, CodePrint can quickly standardize the look of
your source code. As a pretty printer, CodePrint can enhance
the readabilty of your printouts. It can assist you in
understanding code during maintenance and debugging and it's a
great way to print out final source code listings. CodePrint
offers you many optional customization features, enabling you to
format code the way you want to see it. The program provides
on-line help, user-friendly error messages, batch processing and
print spooling to make the program easy to use.
- Reformatter
The reformatting features include syntax driven auto-indenting,
selection of indent style, alignment of comments, editable
keyword templates, adjustable tab spacing and line editing for
consistent whitespace.
- Pretty Printer
The pretty printer optional features include flow lines to
enhance the visualization of code structure, a header with
filename, time and date, page breaks, page numbers, form feeds,
condensed printing, doublestrike printing of keywords,
emphasized printing of executable code, italic printing of
function identifiers, adjustable margins and line numbers.
- On-Line Help
The on-line help provides you with a quick and limited reference
to CodePrint command syntax and command-line options.
User Manual Page 1 of 30
Geist Microsystems CodePrint for C/C++
- Batch Processing
You can format and/or pretty print your files in batch mode by
entering more than one file name on the command line, by using
DOS wild cards or by specifying a file list. CodePrint will
process as many files as the print buffer will hold. And
because CodePrint makes use of the DOS print spooler, you don't
have to wait for the printer to finish before you can continue
to use your computer.
- Local Area Network Compatibility
CodePrint captures the environment variables of your LAN and
provides print capability by spawning to DOS PRINT. You may
however chose to deactivate the print feature of CodePrint and
use a spooling program or a network utility to print the output
files from CodePrint.
- Error Messages
CodePrint provides user-friendly error messages with suggestions
for corrective actions to assist you. A complete listing of
error messages is provided in section 4.5.
User Manual Page 2 of 30
Geist Microsystems CodePrint for C/C++
1.1 SYSTEM REQUIREMENTS
- An IBM Personal Computer or "compatible" running MS-DOS or
PC-DOS Version 3.1 or later.
- A hard disk drive.
- 512K bytes installed memory.
- A dot matrix, daisy wheel or laser printer is required for
the pretty printer features. CodePrint provides support for
Epson FX, IBM Proprinter, HP LaserJet Series IIP,
Diablo 630, NEC 3550 and Qume Sprint 11 printer "emulations".
(One of the above printer emulations should be suitable with
almost any printer.)
1.2 DISK CONTENTS
The following files are included on your product disk. You will
also find these files listed in the file named PACKING.LST.
File Name Description
C.BOR The keyword template for Borland C and Turbo C.
C.DEF The keyword template for ANSI Standard C.
C.MS The keyword template for Microsoft C and QuickC.
CP.EXE The CodePrint reformatter and pretty printer.
CP1.DOC The CodePrint documentation - section 1.
CP2.DOC The CodePrint documentation - section 2.
CPP.BOR The keyword template for Turbo C++ and Borland C++.
CPP.DEF The keyword template for C++ extensions to ANSI C.
CPP.MS The keyword template for C++ extensions to MS C/C++.
DESCRIBE.DOC Software description and author information.
FILE_ID.DIZ Product description for PCBoard BBSes.
HISTORY.DOC Product history and background.
INSTALL.EXE The installation program.
LICENSE.DOC License information.
PACKING.LST A list of files included on the product disk.
README.DOC Last minute information you should read.
REGISTER.DOC The registration and order form.
SHR-WARE.DOC Shareware and the ASP.
SUPPORT.DOC Product support.
SYSOP.DOC BBS sysop information.
VENDOR.DOC Vendor distribution information.
VIRUS.DOC Computer virus myths.
WARRANTY.DOC Warranty information.
User Manual Page 3 of 30
Geist Microsystems CodePrint for C/C++
1.3 HOW CodePrint WORKS
CodePrint reads from your syntax-error-free C or C++ source file
and creates a new output file without modifying your original
source code. If you are using CodePrint as a reformatter, then
the output file will be provided with consistent spacing between
tokens, syntax-driven indenting for the indent style you
selected and alignment of comments. If you are using CodePrint
as a pretty printer, then the output file will also contain the
proper escape sequences needed to enhance the printout's
readability for the printer emulation you have selected. A
header, pagebreaks, page numbers, line numbers and flow lines
are some of the optional pretty printer features. CodePrint can
also send your output files to the printer.
- Reminder
CodePrint is designed for processing syntax-error-free source
code. Using CodePrint on source code with syntax errors may
result in unpredictable behavior. To avoid problems, run your
source code through your compiler or syntax checker first!
User Manual Page 4 of 30
Geist Microsystems CodePrint for C/C++
C o d e P r i n t f o r C / C + +
C h a p t e r 2
I n s t a l l a t i o n
2.0 INSTALLING CodePrint
- Executing the Install Program
An install program is provided for loading CodePrint onto your
hard disk. First load the product disk into your disk drive.
Enter the letter designation of the drive for the product disk,
followed by a colon and press ENTER. Then type INSTALL as shown
below:
C> A:
A> INSTALL
The install program will:
(1) Prompt you for information about source and destination
drives.
(2) Prompt you for information about your printer.
(3) Prompt you for information about your compiler.
(4) Create new directories on your hard drive.
(5) Copy program and support files to your hard drive.
(6) Create an initialization file, CPINI.BAT, and place it
in the default directory.
(7) Add the instruction, CPINI, to your autoexec.bat.
CodePrint options that reside in the CP environment are saved in
an initialization file each time you run the program. The
initialization file is activated when you reboot. The
initialization file, CPINI.BAT will then restore the previous CP
environment with the SET CP command. The setting for the
destination drive is restored with the SET CPDRIVE command and
the setting for the HP paper size, orientation and symbol set is
restored with the SET HP command.
User Manual Page 5 of 30
Geist Microsystems CodePrint for C/C++
- Modifying Your AUTOEXEC.BAT File
You will need to set a path to the main directory, the DOS
directory and the CodePrint language directory. Assuming that
you have loaded CodePrint onto your C: drive, add the following
information to the path in your AUTOEXEC.BAT:
PATH=C:\;C:\DOS;C:\CP\C;C:\CP\CPP;
CodePrint makes use of the print spooler built into the DOS
PRINT command. The PRINT /Q:queuesize switch controls the
number of files that may be in the print queue at any one time.
The allowable range is 1 to 32. The default is 10. To provide
the maximum number of files in the print queue, add the
following line to your AUTOEXEC.BAT:
PRINT /Q:32
If you have issued the PRINT command in the current DOS session,
you will also have to reboot to before you can change the size
of the print queue.
- Check for DOS PRINT
Since CodePrint makes use of the DOS PRINT command, you will
need to check that PRINT.COM or PRINT.EXE has been loaded in the
main directory C:\ or the DOS directory C:\DOS.
- Check Your Printer Configuration
Make sure that your printer is configured correctly by checking
your printer manual for the proper internal switch settings. If
you do not have a printer to match the list of available
configurations, you may utilize your printer by using the
default setting. However, many of the enhanced printer features
are not available with the default setting.
- Local Area Network (LAN) Compatibility
CodePrint will allow you to operate in a LAN environment.
Actually, the preparation required for you to run CodePrint in
a LAN environment is no different than the set-up you currently
perform to use the DOS PRINT command. If you can access a
printer on your LAN with the PRINT command you should be able to
access the same printer with CP. In fact, CodePrint captures
the DOS environment variables of your active session and
provides print capability by spawning to DOS PRINT. CodePrint
should be loaded on each of the network nodes rather than on the
network server.
User Manual Page 6 of 30
Geist Microsystems CodePrint for C/C++
2.1 HEWLETT PACKARD LASERJET PRINTER EMULATION
If you are configuring CodePrint for HP or HPL printer emulation
you may alter the symbol set with the command:
C> SET HP=[hp laserjet options]
2.2 HEWLETT PACKARD LASERJET OPTIONS
You can select the paper size, the orientation and symbol set
by modifying the following HP LaserJet printer options.
/Pn PAPER SIZE
The /P option controls the paper size option. The table
below provides the paper sizes available for HP LaserJet
Series IIP printer emulation and the corresponding value
of n.
┌───────────────┬───────────────┬──────────────────────┐
│ Value of n │ Paper Size │ Dimensions │
├───────────────┼───────────────┼──────────────────────┤
│ 0 │ Letter │ 8-1/2" x 11" │
│ 1 │ Executive │ 7-1/4" x 10-1/2" │
│ 2 │ Legal │ 8-1/2" x 14" │
│ 3 │ A4 │ 210 x 297 mm │
└───────────────┴───────────────┴──────────────────────┘
/On ORIENTATION
The /O option controls the orientation option. Specify
n=0 for portrait orientation and n=1 for landscape
orientation.
/Sn SYMBOL SET
The /S option controls the symbol set option.
(continued on next page)
User Manual Page 7 of 30
Geist Microsystems CodePrint for C/C++
The table below provides the symbol sets available for
HP LaserJet Series IIP printer emulation and the
corresponding value of n.
┌───────────────┬────────────────────────────┬─────────┐
│ Value of n │ HP Symbol Set │ ID # │
├───────────────┼────────────────────────────┼─────────┤
│ 0 │ PC-8 (default) │ 10U │
│ 1 │ PC-8 D/N │ 11U │
│ 2 │ Roman-8 │ 8U │
│ 3 │ PC 850 │ 12U │
│ 4 │ ECMA94 Latin-1 │ 0N │
│ 5 │ ISO ANSI ASCII │ 0U │
│ 6 │ ISO JIS ASCII │ 0K │
│ 7 │ ISO United Kingdom │ 1E │
│ 8 │ ISO HP Spanish │ 1S │
│ 9 │ ISO Chinese │ 2K │
└───────────────┴────────────────────────────┴─────────┘
Although CodePrint works with any HP LaserJet printer (or
compatible), to take full advantage of all of the pretty
printing features, your printer should be equipped with the
following fonts in both portrait and landscape orientation:
Courier, Medium, 10 Pitch, 12 Point
Courier, Bold, 10 Pitch, 12 Point
Courier, Italic, 10 Pitch, 12 Point
Courier, Light, 10 Pitch, 12 Point
Courier, Medium, 12 Pitch, 10 Point
Courier, Bold, 12 Pitch, 10 Point
Courier, Italic, 12 Pitch, 10 Point
Courier, Light, 12 Pitch, 10 Point
Line Printer, Medium, 16.67 Pitch, 7 Point
2.3 PAGE BREAKS FOR MULTIPLE FUNCTIONS
If you write your source code with multiple functions in a single
file, you may want each function to start printing on a new page.
CodePrint provides a form feed prior to printing a function
when two or more previous lines are left blank. You can toggle
this feature on or off with the set command as follows:
C> SET FORMFEED=n
where n is 0 for ON and 1 for OFF. There is no command
available to toggle the form feed from the CP command line.
User Manual Page 8 of 30
Geist Microsystems CodePrint for C/C++
C o d e P r i n t f o r C / C + +
C h a p t e r 3
U s i n g C o d e P r i n t
3.1 CodePrint COMMAND SYNTAX
The CodePrint program is issued from the DOS command line. The
format for invoking CodePrint is:
C> CP <file specification> [options]
3.2 CodePrint FILE SPECIFICATION
The file specification can be a single file, multiple files
(separated by spaces), or the name of a file listing immediately
preceded by the @ symbol. To guard against the processing of
invalid files, CodePrint will only accept file names with legal
extensions. The legal extensions of filespec for C and C++ are
".C", ".CPP", ".H" and ".HPP".
For example, a command to process a single C or CPP source file
might be:
C> CP MYFILE.C
... or ...
C> CP MYFILE.CPP
or a command to process multiple C or C++ source files:
C> CP FILE1.C FILE2.C FILE3.C
... or ...
C> CP FILE1.CPP FILE2.CPP FILE3.CPP
or a command to process a C or C++ source file listing:
C> CP @MYFILES.LST
User Manual Page 9 of 30
Geist Microsystems CodePrint for C/C++
If you create a file listing, put each file name on a separate
line. You can reformat as many as 100 files or pretty print
up to 32 files (the maximum size of the PRINT buffer) in batch
mode.
3.3 SETTING THE CP ENVIRONMENT
You may not want to type options each time you run the program.
You can avoid the necessity for retyping the options by setting
the CodePrint options just once with the DOS SET command. The
format for permanently setting the CodePrint options in a DOS
session is:
C> SET CP=[options]
For example:
C> SET CP=/F/G1/J80
To check the contents of the environment simply enter SET from
the DOS command line:
C> SET
Options entered at the command line take precedence over the
CP environment settings.
User Manual Page 10 of 30
Geist Microsystems CodePrint for C/C++
3.4 CodePrint OPTIONS
You may enter one or more options on the command line. Although
the examples in the manual may show spaces separating each
option (for clarity), you are not required to provide spaces
between options. The following information is provided to
assist you with the use of CP options. Each option deactivates
one or more features of CodePrint. In the absence of these
options all of the features are active and/or set to default
values.
/A AUTOINDENT
The /A option deactivates the auto-indent feature. When
the auto-indent feature is active, it provides syntax
driven automatic indenting for code blocks and loops.
The tab spacing for each indent level can be set with
the /T option.
/Bn PAGE BREAKS
The /B option controls the pagebreak feature. The page-
break feature provides a form feed at the end of each
page for non-zero arguments. Page breaks occur at the
end of each page length. The length of a page is set by
the argument n. By setting the value of n to -1 you
allow the program to select the maximum number of lines
that can fit on the page. The default value for n is -1.
You can deactivate the pagebreak feature altogether by
entering 0 as an argument.
/Cn COMPRESSED PRINTING
The /C option controls the compressed printing feature.
The compressed printing feature provides for variations
in the pitch. The following table defines the pitch
(characters per inch) for each valid argument n and the
corresponding printer emulation.
┌────────────────────────────────────────┐
│ Pitch (cpi) │
┌─────────────┼────────────────────────────────────────┤
│ Value of n │ Other Epson IBM HPLJ Diablo Qume NEC │
├─────────────┼────────────────────────────────────────┤
│ 0 │ *10 17 20 *16.67 10 10 15 │
│ 1 │ *10 10 15 12 10 10 12 │
│ 2 │ *10 10 12 10 10 10 10 │
└─────────────┴────────────────────────────────────────┘
* NOTE: The special printing features (DOUBLESTRIKE,
EMPHASIZED, ITALICS and UNDERLINE) are not available for
these settings!
User Manual Page 11 of 30
Geist Microsystems CodePrint for C/C++
For HP and HPL emulation the /Cn option also compresses
the vertical spacing. The following table defines the
vertical motion index (VMI) and the resulting lines per
page for each valid argument n.
┌────────────────────────┐
│ Lines Per Page │
┌─────────────┬───────┬───────┼────────────┬───────────┤
│ Value of n │ Point │ VMI │ Portrait │ Landscape │
├─────────────┼───────┼───────┼────────────┼───────────┤
│ 0 │ 7 │ 6.00 │ 80 │ 60 │
│ 1 │ 10 │ 6.32 │ 63 │ 57 │
│ 2 │ 12 │ 8.00 │ 60 │ 45 │
└─────────────┴───────┴───────┴────────────┴───────────┘
/D DOUBLESTRIKE PRINTING (of keywords)
The /D option supresses the doublestrike printing
feature. When the doublestrike printing feature is
active, it provides for doublestrike printing of
keywords. Doublestrike printing is equivalent to the
BOLD typeface.
/E EMPHASIZED PRINTING (of executable code)
The /E option deactivates the emphasized printing
feature. When the emphasized printing feature is
active, it provides for emphasized printing of
executable code. Emphasized printing is equivalent to
the MEDIUM typeface.
/F FLOW LINES
The /F option deactivates the flow lines feature. When
this feature is active, it provides flow lines for
visualizing code blocks and loops. The vertical flow
lines feature has no effect when the auto-indent feature
is inactive.
/Gn PRINTER CONFIGURATION
The /G option deactivates the printer configuration
feature. You will need to set this option to match the
dip switch settings if you have a dot matrix printer. If
you are not familiar with how to configure you printer,
consult your printer manual. Then set the dip switches
in your printer accordingly.
User Manual Page 12 of 30
Geist Microsystems CodePrint for C/C++
┌─────────────┬────────────────────────────────────────┐
│ Value of n │ Printer Configuration (Emulation) │
├─────────────┼────────────────────────────────────────┤
│ 0 │ Other (default) │
│ 1 │ Epson FX │
│ 2 │ IBM Proprinter │
│ 3 │ HP LaserJet Series IIP (Portrait) │
│ 4 │ Diablo 630 │
│ 5 │ NEC 3550 │
│ 6 │ Qume Sprint 11 │
│ 7 │ HP LaserJet Series IIP (Landscape) │
└─────────────┴────────────────────────────────────────┘
The special printing features (COMPRESSED,
DOUBLESTRIKE, EMPHASIZED, ITALICS and UNDERLINE) are not
valid for the default printer configuration. The
italics printing feature is not a valid feature of the
IBM, DIABLO and NEC printer configurations.
* NOTE: You MUST have access to the necessary fonts for
printing in any HP emulation!
/H HEADER
The /H option deactivates the header feature. When the
header feature is active, it provides for a header at
the top of each file listing. The header consists of the
filename, time and date that the file was printed.
/I ITALIC PRINTING (of function identifiers)
The /I option deactivates the italicized printing
feature. When the italicized printing feature is
active, it provides for italicized printing of function
identifiers.
/Jn JUSTIFICATION (of in-line comments)
The /J option controls the justification (alignment) of
in-line comments. If you want comments to be left
justifed then n must be a positive integer. If you want
comments to be right justified then n must be a negative
integer. If n=0, then a tab is placed between the end
of the executable code and the beginning of each
comment. If n is non-zero, it represents the number of
characters from the left or right edge of the printout.
The default is n=80, leaving all in-line comments
aligned on the 80th column from the left edge of the
paper.
User Manual Page 13 of 30
Geist Microsystems CodePrint for C/C++
┌─────────────┬────────────────────────────────────────┐
│ Value of n │ Effect On In-line Comments │
├─────────────┼────────────────────────────────────────┤
│ Zero │ Tab before each comment │
│ Positive │ Left justified from left edge │
│ Negative │ Right justified from right edge │
└─────────────┴────────────────────────────────────────┘
The justification feature has no effect when the
autoindent feature is inactive.
/Kn KEYWORD TEMPLATE
The /K option controls the keyword template feature.
The keyword template feature provides a limited
selection of keyword templates supporting popular C and
C++ compilers. You may also edit these files. The
default is n=0, resulting in the use of a default
keyword file.
┌─────────────┬─────────────┬──────────────┬───────────┐
│ Value of n │ C Keywords │ C++ Keywords │ Support │
├─────────────┼─────────────┼──────────────┼───────────┤
│ 0 │ C.DEF │ CPP.DEF │ ANSI │
│ 1 │ C.MS │ CPP.MS │ Microsoft │
│ 2 │ C.BOR │ CPP.BOR │ Borland │
└─────────────┴─────────────┴──────────────┴───────────┘
/L LINE NUMBER
The /L option deactivates the line numbers feature. When
the line numbers feature is active, it provides for line
numbers to be displayed at the beginning of each line of
code.
/Mn MARGIN
The /M option controls the margin feature. The value n
sets the number of characters to indent. Legal values
range from 0 to 16. The default is n=0, or no margin.
For portrait orientations, the margin is on the left
side of the page. For landscape orientations, the
margin is on the top side of the page.
/N PAGE NUMBERS
The /N option deactivates the page numbers feature. When
the page numbers feature is active, it provides page
numbers at the bottom center of each page. The page
numbers feature has no effect when the page break feature
is inactive.
User Manual Page 14 of 30
Geist Microsystems CodePrint for C/C++
/O OPTIONS
The /O option deactivates the options listing feature.
When the options listing feature is active, it provides
a list of the option status in the header. The options
feature has no effect when the header feature is
inactive.
/Pn PRINTER PORT
The /P option controls the printer port status check
activated prior to printing. The value n sets the number
of the printer port to check. The default is 0, the DOS
printer port LPT1.
* NOTE: You can deactivate the print feature altogether by
assigning an invalid printer port (e.g. /P7) to the
argument n!
┌─────────────┬────────────────────────────────────────┐
│ Value of n │ Printer Port │
├─────────────┼────────────────────────────────────────┤
│ 0 │ LPT1 (default) │
│ 1 │ LPT2 │
│ 2 │ LPT3 │
│ 3 │ COM1 (for IBM PC and true compatibles) │
│ 4 │ COM2 (for IBM PC and true compatibles) │
│ 5 │ COM3 (for IBM PC and true compatibles) │
│ 6 │ COM4 (for IBM PS/2 only) │
└─────────────┴────────────────────────────────────────┘
The COM1, COM2, COM3 ports work only for IBM PCs and
true compatibles. The COM4 port is available for IBM
PS/2s.
/Q QUICK PRINT
The /Q option activates the quick print macro. When the
quick print feature is active, it provides a quick
printout of the destination file by cancelling the
following enhanced printing features: doublestrike,
emphasized, italicized and underlined printing. This is
equivalent to the /D /E /I /U options.
User Manual Page 15 of 30
Geist Microsystems CodePrint for C/C++
/R REFORMAT
The /R option activates the reformatting macro. It
provides for reformatting of source files by cancelling
all pretty printing features including: page breaks,
doublestrike and emphasized printing, form feeds,
header, italicicized printing,line numbers, margin, page
numbers, printing, underlined printing and flow lines.
This is equivalent to the /B0 /D /E /F /H /I /L /M /N
/P-1 /U /V /X options.
/S SPACES
The /S option deactivates the spaces feature. When the
space feature is active, it provides consistent
whitespace editing for each line of code. The spaces
feature has no effect when the auto-indent feature is
inactive.
/Tn TAB SPACING
The /T option controls the tab spacing feature. The tab
spacing feature specifies the number of spaces per
indent level. Legal values rangw from 1 to 8. The
default is n=4. The tab spacing feature has no effect
when the auto-indent feature is inactive.
/Vn TAB CONVERSION
The /V option controls the tab conversion feature.
CodePrint replaces any tabs it finds in the source file
with an equivalent number of spaces in the destination
file. The value n specifies the number of spaces that
are used to replace tabs. Legal values range from 1 to
8. The default is n=8, resulting in 8 spaces per tab.
The spaces feature has no effect when the auto-indent
feature is inactive.
/Wn CARRIAGE WIDTH
The /W option controls the carriage width option. The
carriage width option specifies the width of the printed
page in decimal inches. Legal values for carriage width
are between 1.0 and 18.0 inches. The default value of
8.0 inches allows for 1/4" margins on each side of an
8-1/2" sheet of paper.
/X EXTRA FORM FEED
The /X option deactivates the extra form feed feature.
When the extra form feed feature is active, it provides
for a form feed at the end of each file printed.
User Manual Page 16 of 30
Geist Microsystems CodePrint for C/C++
/Yn INDENT STYLE
The /Y option controls the indent style of the formatted
source code.
┌─────────────┬──────────────────┬─────────────────────┐
│ Value of n │ Description │ Example │
├─────────────┼──────────────────┼─────────────────────┤
│ 0 │ No Effect │ │
├─────────────┼──────────────────┼─────────────────────┤
│ 1 │ Standard │ if (<condition>) { │
│ │ K&R Indent │ <statement> │
│ │ Style │ } │
├─────────────┼──────────────────┼─────────────────────┤
│ 2 │ Braces on │ if (<condition>) │
│ │ Separate Lines │ { │
│ │ Aligned with │ <statement> │
│ │ Keyword │ } │
├─────────────┼──────────────────┼─────────────────────┤
│ 3 │ Braces on │ if (<condition>) │
│ │ Separate Lines │ { │
│ │ Indented Beyond │ <statement> │
│ │ Keyword │ } │
└─────────────┴──────────────────┴─────────────────────┘
User Manual Page 17 of 30